package com.ssm.gbq.mapper;

import com.ssm.gbq.model.Complaint;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ComplaintMapper {
    /**
     * 条件分页查询
     * @param complaint
     * @param currentPage
     * @param pageSize
     * @return
     * @throws Exception
     */
    List<Complaint> getALLComplaintTable(@Param("complaint") Complaint complaint,@Param("currentPage") int currentPage, @Param("pageSize")int pageSize) throws Exception;
    /**
     * 条件分页查询获取条数
     * @param complaint
     * @param currentPage
     * @param pageSize
     * @return
     * @throws Exception
     */
    int getALLComplaintTableCount(@Param("complaint") Complaint complaint) throws Exception;
    /**
     * 添加a
     * @param complaint
     * @return
     */
    int addComplaint(Complaint complaint);

    /**
     * 修改
     * @param complaint
     * @return
     */
    int updateComplaint(Complaint complaint);

    /**
     * 删除
     * @param id
     * @return
     */
    int delComplaint(@Param("id")Integer id);
    /**
     * 根据id查询
     * @param id
     * @return
     */
    Complaint showComplaintById(@Param("id") Integer id);
}
